[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Runtime Errors

    Runtime errors occur when a non-I/O error is encountered during the
    execution of a program. Most of these errors are caused by illegal
    parameters being passed to arithmetic functions or range violations.

          Hex       Dec       Meaning
          ---       ---       -------
          $01        01       Floating-point overflow
          $02        02       Division by zero attempted
          $03        03       Sqrt argument error
          $04        04       Ln argument error
          $10        16       String length error
          $11        17       Invalid string index
          $90       144       Index out of range
          $91       145       Scalar or subrange out of range
          $92       146       Out of integer range
          $F0       240       Overlay file not found
          $FF       255       Heap/stack collision (out of memory)

    When a runtime error occurs, the program terminates immediately. The
    runtime error code is printed on the screen in the following format:

           Run-time error NN, PC=address
           Program Aborted

    The runtime error code NN is displayed in hexadecimal. The address
    'address' is also displayed in hexadecimal. If the user is in Turbo
    Pascal, then he is prompted to press the <ESC> key to continue. At
    that point, Turbo Pascal enters the Edit mode and the cursor is placed
    on the line where the runtime error occurred. If the user is not in
    Turbo Pascal, but at the MS-DOS command line, then after the runtime
    error message is displayed, control returns to the operating system.
    If the user wishes to determine the line at which the runtime error
    occurred, use the 'Find Run-time Error' option within the Options
    Menu.

    When first debugging a program, the Index Check directive should be
    active {$R+}. This will perform runtime index checks. If this check is
    passive {R-}, then runtime index errors will not be caught and the
    program may crash or behave erratically.

See Also: Compiler Errors I/O Errors
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson